vcProductCreatorTableMode

Configuration for table feed mode in product creator. Holds a list of rows, each defining which product type to instantiate and at what simulation time. The rows are automatically sorted in ascending order by the product creation time. The rows can be loaded from a file or defined using methods of this class. Modifying the rows during simulation is allowed but may result in e.g. inaccurate timing of when the products are created.

See in: Overview

Module: vcProcessModel

Parent: vcObject

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
FileStringRGets a string of the Uri pointing to an xls file.
ProductRowslistRList of all currently defined product rows. The rows are returned as copies.
PropertiesvcPropertyContainerRGets a property container containing the properties in the product creator table mode.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
clearRowsNoneNoneDeletes all product rows.
createRowvcProductCreatorTableRowvcProductType productType,
Optional Keyword[creationTime = Real]
Creates a new product row.
See more
Parameters:
productType (vcProductType): Sets the row's product type. Must be set to make it valid.
creationTime (Real or Integer): Sets the row's creation time. Value must be greater than or equal to zero.

Exceptions:
ValueError: When creation time is less than zero.

Returns:
Integer: The new row.
deleteRowNoneInteger indexDeletes the product row at given index.
See more
Parameters:
index (Integer): The index must be in inclusive range 0 to RowCount - 1.

Exceptions:
IndexError: When index is less than zero or more than RowCount.
readRowsFromFilelistString fileUri,
Optional Keyword[showErrorMessages = Boolean]
Attempts to load rows from an xls file and returns them as a list if successful.
See more
Does not modify this table mode configuration.

Parameters:
fileUri(String): Uri to an xls file to read rows from.
showErrorMessages(Boolean): Determine if errors are printed to the output.

Returns:
List of vcProductCreatorTableRow: The content of the file.
Returns an empty list if reading or parsing the file failed.
replaceAllRowsNonelist newRowsDeletes all rows and then adds the new rows as copies.
See more
The rows are sorted by the creation time using a stable sort algorithm.

Parameters:
newRows(List of vcProductCreatorTableRow): The new rows to replace the existing ones with.

Exceptions:
ValueError: When an object in list is not vcProductCreatorTableRow.
ValueError: When Product type to create is not set.
ValueError: When Product creation time is less than zero or not finite.